--贝塞尔曲线
local M = _G.CommonOHOH.class.new(script);
local Gravity = workspace.Gravity;
function M.ParaCurveWithAlpha(p1, p2, p3, p4, p5)
	p5 = p5 or Gravity;
	return p1:ParaCurveRealTime(p2, p3, 2 * (p3.Y / p5) * p4, p5);
end;

function M.ParaCurveRealTime(p6, p7, p8, p9, p10)
	p10 = p10 or Gravity;
	return p7 + Vector3.new(p8.X * p9, p8.Y * p9 - math.pow(p9, 2) * p10 / 2, p8.Z * p9);
end;

--v31.start_pos, v31.mid_pos, v31.att.WorldPosition, v32
function M.BezierCurve(self, start_pos, mid_pos, end_pos, scale)
	return math.pow(1 - scale, 2) * start_pos + 2 * scale * (1 - scale) * mid_pos + math.pow(scale, 2) * end_pos;
end;
function M.BezierCurveWithDir(self, start_pos, p18, p19, p20, p21)
	local v2 = Vector3.new(p18.X, 0, p18.Z).Unit * p20;
	return self:BezierCurve(start_pos, start_pos + v2 / 2 + Vector3.new(0, p19, 0), start_pos + v2, p21);
end;
function M.BezierCurveToPosition(self, start_pos, end_pos, yoffset, scale)
	return self:BezierCurve(start_pos, (end_pos - start_pos) / 2 + start_pos + Vector3.new(0, yoffset, 0), end_pos, scale);
end;
function M.StraightLine(p27, p28, p29, p30)

end;
return M;
